#!/bin/sh

SCRIPT=`readlink -f "$0"`
P=`dirname "$SCRIPT"` # $P/$0
cd $P

CC="../cc.sh"

for i in `ls *.pwn`
do
  echo "compiling $i..."
  $CC $i $* -pprefix.inc
  if [ $? -ne 0 ]
  then
    echo "error compiling $i" > /dev/stderr
    exit 1
  fi
done
